/**
 * @fileOverview layouts/Loading.js
 * @author sunweibin
 */

import React, { PropTypes } from 'react';
import { Spin } from 'antd';

import styles from './Loading.less';

function Loading({ loading,style,siderFold }) {
  if (!loading) {
    return null;
  }
  const myStyle=style||{}

  return (
    <div className={styles.popmask} style={myStyle}>
      <div className={styles.inner}>
        <Spin tip="Loading..." spinning={loading} />
      </div>
    </div>
  );
}

Loading.propTypes = {
  loading: PropTypes.bool.isRequired,
};

export default Loading;
